<h1>Listing tasks</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Estimated effort</th>
    <th>Description</th>
    <th>Finished</th>
		<th></th>
  </tr>

<% for project in @projects %>
	<tr><td><%= h project.title %>:</td><td colspan="4"></td></tr>
<% for task in project.tasks %>
  <tr>
    <td><%= link_to h(task.name), task %></td>
    <td><%=h task.estimated_effort %></td>
    <td><%=h task.description %></td>
    <td><%=h task.finished %></td>
    <td>
			<%= link_to 'Edit', edit_task_path(task) %> |
			<%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %>
		</td>
  </tr>
<% end %>
<% end %>
</table>

<br />

<%= link_to 'New task', new_task_path %>
